/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Article } from '../models/Article';
import type { ArticleItem } from '../models/ArticleItem';
import type { ArticleItemQueryCriteria } from '../models/ArticleItemQueryCriteria';
import type { ArticleQueryCriteria } from '../models/ArticleQueryCriteria';
import type { RArticle } from '../models/RArticle';
import type { RListArticleItem } from '../models/RListArticleItem';
import type { RPageArticle } from '../models/RPageArticle';
import type { RString } from '../models/RString';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class ArticleService {

    /**
     * @param requestBody 
     * @returns RString OK
     * @throws ApiError
     */
    public static updateArticle(
requestBody: Article,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: '/article/update',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody 
     * @returns RString OK
     * @throws ApiError
     */
    public static updateArticleItem(
requestBody: ArticleItem,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: '/article/item/pdate',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 批量获取合集信息
     * 批量获取用户信息，用于页面展示
     * @param requestBody 
     * @returns RPageArticle OK
     * @throws ApiError
     */
    public static queryArticleAll(
requestBody: ArticleQueryCriteria,
): CancelablePromise<RPageArticle> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/article/list',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 批量获取文章信息
     * 批量获取用户信息，用于页面展示
     * @param requestBody 
     * @returns RListArticleItem OK
     * @throws ApiError
     */
    public static queryArticleItemAll(
requestBody: ArticleItemQueryCriteria,
): CancelablePromise<RListArticleItem> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/article/item/list',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody 
     * @returns RString OK
     * @throws ApiError
     */
    public static addArticleItem(
requestBody: ArticleItem,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/article/item/add',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 根据id获取文章
     * 批量获取用户信息，用于页面展示
     * @param requestBody 
     * @returns RArticle OK
     * @throws ApiError
     */
    public static queryArticleById(
requestBody: ArticleQueryCriteria,
): CancelablePromise<RArticle> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/article/byId',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody 
     * @returns RString OK
     * @throws ApiError
     */
    public static addArticle(
requestBody: Article,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/article/add',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param uid 
     * @returns RString OK
     * @throws ApiError
     */
    public static deleteArticleItem(
uid: number,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/article/item/delete',
            query: {
                'uid': uid,
            },
        });
    }

    /**
     * @param uid 
     * @returns RString OK
     * @throws ApiError
     */
    public static deleteArticle(
uid: number,
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/article/delete',
            query: {
                'uid': uid,
            },
        });
    }

}
